/*
 * Picture.cpp
 *
 *  Created on: 17 Jun 2011
 *      Author: s88900
 */

#include "Picture.h"

Picture::Picture() {
	image = "000000000";
	lock = new Mutex();
}

void Picture::write(string s){
	lock->lock();
	//cout << "write..." << endl;
	image = s;
	//cout << "end write..." << endl;
	lock->unlock();
}

string Picture::read(){
	lock->lock();
	//cout << "read..." << endl;
	string x = image;
	//cout << "end read..." << endl;
	lock->unlock();
	return x;
}

Picture::~Picture() {
	image = "";
}
